//
//  findPassWordViewController.m
//  ZhenPin
//
//  Created by tmosport on 14-7-14.
//  Copyright (c) 2014年 zhenpin. All rights reserved.
//

#import "findPassWordViewController.h"

@interface findPassWordViewController ()
@property (strong, nonatomic) IBOutlet UIWebView *findWebView;

@end

@implementation findPassWordViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.title = @"找回密码";
    // Do any additional setup after loading the view.
    NSURL* url = [NSURL URLWithString:[NSString stringWithFormat:@"http://m.zhenpin.com/index.php?c=APP_member&&a=getMyPass"]];
    [_findWebView loadRequest:[NSURLRequest requestWithURL:url]];

}
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType{
    NSURL *url = [request URL];
    if ([[url scheme] isEqualToString:@"zpmall"]) {
        [self goHome];
    }
    return YES;
    
}
-(void)goHome
{
    [self.navigationController popToRootViewControllerAnimated:NO];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
